package com.yuqian.JavaSe.feature.extend;

import java.awt.AWTEvent;
import java.awt.event.ActionEvent;
import java.lang.reflect.Proxy;

public class SExtends {
	public static void main(String[] args) {
		//Son son =new  Son();
	//	son.test();
		//son.sysy();
		
		Father son =new  Son();
		son.log();
		
		//Proxy.newProxyInstance(Son.class.getClassLoader(), Son.class, new )
		
		//打印：我是儿子
		/**
		 * 关于this  谁是方法的调用者就指向谁
		 */
	}
}



class Father{
	private int o=5;
	public void log(){
		System.out.println(this.o);
	}
	
	
	void showDiscripte(){
		this.getDiscripte();
	}
	
	void getDiscripte(){
		System.out.println("我是父亲");
	}
	
	protected void sysy(){
		System.out.println("ssss");
	}
	
	public AWTEvent get(){
		return  new ActionEvent(new SExtends(),1,"sss");
	}
}

class Son extends Father{
	
	public int o=4;
	public void log(){
		System.out.println(this.o);
	}

	
	public void test(){
		super.showDiscripte();
	}
	
	void getDiscripte(){
		System.out.println("我是儿子");
	}
	
	
	public ActionEvent get(){
		return  new ActionEvent(new SExtends(),1,"sss");
	}
}